#ifndef LEVEL_H
#define LEVEL_H

#include <SFML/Graphics.hpp>
#include <string>
#include "globals.h"
#include "tinyxml.h"
#include "ConfigFile.h"
#include "ImageManager.h"
#include "Textured.h"

// Because of recursive inclusion...
class Camera;
class Character;
class Hero;

using namespace std;
using namespace sf;

class Level {
public:
    Level(string levelName);
    ~Level();

    string getName();
    string getTitle();
    int    getWidth();
    int    getHeight();

    Sprite*            background;
    Sprite*            foreground;
    Camera*            camera;
    vector<Character*> characters;
    vector<Sprite*>    collidables;
    Hero*              hero;

private:
    void initCharacters();
    void initCollidables();
    
    TiXmlDocument* xmlDoc;
    TiXmlElement*  xml;
    string         path;
    string         name;
    string         title;
    int            width;
    int            height;
};

#endif
